package com.woniuxy.oldmanapi.mapper;

import com.woniuxy.oldmanapi.cvo.WarehouseVo;
import com.woniuxy.oldmanapi.entity.Warehouse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface WarehouseMapper extends Mapper<Warehouse> {
    List<WarehouseVo> selectByCons(@Param("buyname") String buyname,@Param("state") int state);

    void insetWarehouse(Warehouse warehouse);

    void updateWarehouse(Warehouse warehouse);

    @Update("update warehouse set  state=#{state} where id=#{id}")
    void updateWareseState(@Param("id") int id, @Param("state") int state);
}
